package com.cool.modules.erp.entity;

import com.cool.core.base.TenantEntity;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import com.tangzc.mybatisflex.autotable.annotation.ColumnDefine;
import lombok.Getter;
import lombok.Setter;

/**
 * 供应商信息
 */
@Getter
@Setter
@Table(value = "t_supplier_info", comment = "供应商信息")
public class ErpSupplierInfoEntity extends TenantEntity<ErpSupplierInfoEntity> {

    @ColumnDefine(comment = "供应商编码")
    private String code;

    @ColumnDefine(comment = "供应商名称")
    private String name;

    @ColumnDefine(comment = "供应商简称")
    private String simpleName;

    @ColumnDefine(comment = "供应商类别ID")
    private Long typeId;

    @ColumnDefine(comment = "联系人名")
    private String contactName;

    @ColumnDefine(comment = "联系人电话")
    private String contactPhone;

    @ColumnDefine(comment = "邮箱地址")
    private String email;

    @ColumnDefine(comment = "联系地址", type = "text")
    private String address;

    @ColumnDefine(comment = "备注", type = "text")
    private String remark;

    @ColumnDefine(comment = "启用状态：1启用 0未启用", defaultValue = "1")
    private Integer enable;

    @RelationOneToOne(selfField = "typeId", targetField = "id")
    private ErpSupplierTypeEntity typeEntity;
}
